//
//  PlanVM.h
//  WanCaiC8
//
//  Created by tangang on 2018/4/26.
//  Copyright © 2018年 tangang. All rights reserved.
//

#import "BaseVM.h"
#import "PlanModel.h"
#import "BetModel.h"
#import "PlanRecommendModel.h"
#import "LotteryTypeModel.h"
#import "ExpertsModel.h"
#import "ExpertsHotModel.h"
#import "ExceptionalRecordModel.h"
#import "CommentModel.h"
@interface PlanVM : BaseVM

/**
 * 我的计划
 * @param uid 用户Id
 * @param ltype 彩种Id 0=全部 其他=具体彩种 默认=0
 * @param winState 开奖状态 0=全部 1=已开奖 2=未开奖 默认=0
 * @param pageIndex 页码
 */
- (void)getMyPlanWithUid:(NSString *)uid andLtype:(NSInteger)ltype andWinState:(NSInteger)winState andPageIndex:(NSInteger)pageIndex Success:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 发布计划
 * @param lType 彩种类型
 * @param currentIssue 最新期号
 * @param betInfo 投注信息
 */
- (void)postBetWithType:(NSInteger)lType andIssue:(NSString *)currentIssue andBetInfo:(NSString *)betInfo Success:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取当前用户某个彩种当前期号计划集合
 * @param ltype 彩种Id 0=全部 其他=具体彩种 默认=0
 */
- (void)getCurrentPlanWithLtype:(NSInteger)ltype Success:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取官方计划推荐数据(分页)
 * @param ltype 彩种Id 0=全部 其他=具体彩种 默认=0
 * @param pageIndex 页数据量
 * @param pageSize 获取条数
 */
- (void)getPlanDataWithLtype:(NSInteger)ltype andPageIndex:(NSInteger)pageIndex andPageSize:(NSInteger)pageSize Success:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取我的计划筛选列表
 */
- (void)getLotteryListOfMyPlanWithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取专家列表
 * @param lType 彩种Id
 * @param playName 玩法名称
 * @param type 类型 1=高手推荐 2=免费专家
 * @param pageIndex 页数据量
 */
- (void)getExpertListWithLtype:(NSInteger)lType andPlayName:(NSString *)playName andType:(NSInteger)type andPageIndex:(NSInteger)pageIndex WithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取专家热搜记录
 * @param lType 彩种Id
 * @param top 取几条记录
 */
- (void)getExpertHotList:(NSInteger)lType andTop:(NSInteger)top WithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取专家历史搜索
 * @param lType 彩种Id
 */
- (void)getHistoryListWithLtype:(NSInteger)lType WithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;


/**
 * 搜索专家
 * @param lType 彩种Id
 */
- (void)searchExperWithLtype:(NSInteger)lType andNickName:(NSString *)NickName WithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;
/**
 * 插入一条浏览记录
 * @param ltype 彩种Id
 * @param uid 用户ID
 */
- (void)insterHistoryWithUid:(NSString *)uid WithLtype:(NSInteger)ltype;

/**
 * 删除一条历史记录
 * @param ltype 彩种Id
 * @param uid 用户ID
 */
- (void)deleteHistoryWithUid:(NSString *)uid WithLtype:(NSInteger)ltype WithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;


/**
 * 获取用户近期竞猜记录(返回当前用户是否点阅过该记录)
 * @param ltype 彩种Id
 * @param uid 用户ID
 * @param playName 玩法名称
 */
- (void)getUserLastPlayWithUid:(NSString *)uid withPlayName:(NSString *)playName WithLtype:(NSInteger)ltype WithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取用户近期打赏记录
 * @param ltype 彩种Id
 * @param uid 用户ID
 * @param top 固定条数
 */
- (void)getUserExceptionalRecordWithUid:(NSString *)uid withTop:(NSInteger)top WithLtype:(NSInteger)ltype WithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 打赏
 * @param Id 计划ID
 * @param coin 金币数量
 */
- (void)giftCoinWithId:(NSString *)Id andCoin:(NSString *)coin WithSuccess:(SuccessBlock)success andFail:(FailBlock)fail;


/**
 * 获取精彩评论
 * @param ID 彩种ltype
 * @param type 类型 1=计划 2=文章 3=计划
 * @param count 查询数量
 * @param userId 查询数量
 */
- (void)getWonderfulCommentId:(NSString *)ID andType:(NSInteger)type andCount:(NSInteger)count andUserId:(NSString *)userId Success:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 发表评论
 * @param ID 彩种ltype
 * @param type 类型 1=计划 2=文章
 * @param userId 类型 1=计划 2=文章
 * @param Content 评论内容
 * @param CommentType 评论类型 1=一级评论 2=回复；
 */
- (void)publishWithId:(NSString *)ID andType:(NSInteger)type andContent:(NSString *)Content andCommentType:(NSInteger)CommentType andUserId:(NSString *)userId andPic:(NSArray *)pic Success:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取评论列表
 * @param ID 计划Id或文章Id或用户ID
 * @param userId 计划Id或文章Id或用户ID
 * @param type 类型 1=计划 2=文章
 * @param lastId 最后一条ID
 * @param pageSize 拉去条数
 */
- (void)getCommentListWithId:(NSString *)ID andType:(NSInteger)type andLast:(NSString *)lastId andPageSize:(NSInteger)pageSize andUserId:(NSString *)userId Success:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取评论总数
 * @param ID 计划Id或文章Id或用户ID
 * @param type 类型 1=计划 2=文章 3=计划
 */
- (void)getCommentCountWithId:(NSString *)ID andType:(NSInteger)type andUserId:(NSString *)userId Success:(SuccessBlock)success andFail:(FailBlock)fail;


/**
 * 获取该用户最新计划
 * @param uid 用户ID
 * @param lType 彩种ID
 * @param playName 玩法名称
 */
- (void)getLastPlayWithUid:(NSString *)uid andLType:(NSInteger)lType andPlayName:(NSString *)playName andIssue:(NSString *)issue Success:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取用户已查询过的预测内容
 * @param uid 用户ID
 * @param lType 彩种ID
 * @param playName 玩法名称
 */
- (void)getLastPlanWithUid:(NSString *)uid andLType:(NSInteger)lType andPlayName:(NSString *)playName andIssue:(NSString *)issue Success:(SuccessBlock)success andFail:(FailBlock)fail;

/**
 * 获取点阅所需金币数
 * @param userId 用户ID
 * @param lType 彩种ID
 */
- (void)getReadCoinWithUid:(NSString *)userId andLType:(NSInteger)lType Success:(SuccessBlock)success andFail:(FailBlock)fail;

+(PlanVM *)manage;
@end
